<extend name="./Application/Common/View/block/base.php" />
<block name="header">
    <include file="./Application/Admin/View/block/easyui_header.php" />
    <link href="__PUBLIC__/css/Content/index.css" rel="stylesheet" type="text/css" />
    <style>
        #dg{
            height: 100%;;
        }
    </style>
</block>
<block name="bdoy">
    <body>
    <table id="dg"></table>

    <div id="toolbar" style="padding:5px;height:auto">
        <div style="margin-bottom:5px">
            <a href="#" id="reload_button" class="easyui-linkbutton" iconCls="icon-reload" plain="true">{:LANG('reload')}</a>
        </div>
        <div id="queryMaterialsRemovalParamZone">
            <form id="query_form" method="post" action="">
                <table>
                    <tr>
                        <td>设施名称：</td>
                        <td><input type="text" name="name" width="200"/></td>
                        <td>雨情：</td>
                        <td>
                            <select name="rain_sit">
                                <option value="">全部</option>
                                <option value="4">大雨</option>
                                <option value="3">中雨</option>
                                <option value="2">小雨</option>
                            </select>
                        </td>

                        <td><a id="query_button" href="#" class="easyui-linkbutton" iconCls="icon-search">查询</a></td>
                        <td><a href="#" class="easyui-linkbutton" iconCls="icon-undo" onclick="javascript:$('#query_form').form('clear');">重置</a></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>



    </body>
</block>
<block name="footExtendJs">
    <script type="text/javascript">
        $(function(){
            var request_url = '__URL__/get_live_rain_report';
            jQuery('#dg').datagrid({
                fit:true,
                nowrap: false,
                striped: true,
                collapsible:false,
                url:request_url,
//                queryParams:{page:1,rows:20},
                method:'get',
                pageNumber:1,
                pageSize:{:get_kv_val('admin_page_list_num')},
                pageList:[{:get_kv_val('admin_page_list_num')},50,100,200],
                idField:'id',
                    remoteSort: false,
                    columns:[[
                    {field:'id',title:'ID', width:100,align:'center',hidden:true},
                    {field:'name',title:'设施名称', width:180,align:'center'},
                    {field:'rain_sit_text',title:'雨情', width:80,align:'center'},
                    {field:'date',title:'上报时间', width:150,align:'center'},
                    {field:'stil_time',title:'已持续时间<br>(小时)', width:100,align:'center'},
                    {field:'realname',title:'当前执勤人员', width:250,align:'center'},
                    {field:'mobile',title:'执勤电话', width:120,align:'center'},
                    {field:'phone',title:'座机', width:120,align:'center'},
                ]],
                pagination:true,
                rownumbers:true,
                singleSelect:false,
                toolbar: '#toolbar',
            });
        });
        $('#reload_button').click(function(){
            $('#dg').datagrid('load', {});
        });
        $('#search_button').click(function(){
            $('#query_form').toggle();
            $('#dg').datagrid("resize");
        });
        $('#query_button').click(function(){
            var obj = $('#query_form').serializeJson();
            $('#dg').datagrid('load',obj);
        });
    </script>
</block>
